 <div id="main">
		<div id="main_left" class="f_left">
			<div id="bread"><?php echo $bread_crumbs; ?></div>
			<div class="index_main_block">
				<h1 class="article_title"><a href="" class="c2d6cb2"><?php echo $info['title']; ?></a></h1>
				<div class="article_description">
					<?php echo $info['content'];?>
				</div>
			</div>
			<div id="info">
				评论数：<?php echo $info['reply_number'];?>　发布时间：<?php echo date('Y-m-d', $info['create_time']); ?>
			</div>
			<div id="comment">
				<div class="reply_sum">共<?php echo $info['reply_number']; ?>条评论</div>
				<?php if(!empty($reply)):?>
				<?php foreach($reply as $key => $re):?>
				<div class="reply_content">
					&nbsp;<a name="F<?php echo $re['id'];?>">#<?php echo count($reply)-$key;?></a>&nbsp;<?php echo $re['name'];?>：
					<div class="re_c">
						<div><?php if(!empty($re['email'])):?>邮箱：<?php echo $re['email'];?> <?php endif ?>评论时间：<?php echo date('Y-m-d', $re['reply_time']);?> <?php if(!D::app()->user()->isGuest()):?><a class="del_reply" rid="<?php echo $re['id']; ?>" href="javascript:;">删除</a><?php endif; ?></div>
						&nbsp;<?php echo $re['content'];?>
					</div>
				</div>
				<?php endforeach; endif ?>
			</div>
			<div id="comment_form">
				<div class="add_comment_title">发表评论</div>
				<form>
					<ul>
						<li>昵称：<span>*</span></li>
						<li><input type="text" id="name" name="name" class="in_text" /></li>
						<li>邮箱：</li>
						<li><input type="text" id="email" name="email" class="in_text" /></li>
						<li>内容：<span>*</span></li>
						<li><textarea id="content" name="content"></textarea></li>
						<li><img src="<?php echo D::createUrl('index/verifycode');?>" onclick="this.src='<?php echo D::createUrl('user/verifycode',array('time'=>time()));?>'" /></li>
						<li>验证码：<span>*</span></li>
						<li><input type="text" name="code" id="code" class="in_text" /></li>
						<input type="hidden" name="token" id="token" value="<?php echo $token_code;?>" />
						<input type="hidden" name="posts_id" id="posts_id" value="<?php echo $info['id'];?>" />
						<li><input id="submit" type="button" value=" 发表评论 " /></li>
					</ul>
				</form>
			</div>
			<script type="text/javascript">
			$(function(){

				$('.reply_content').mouseover(function(){
					$(this).children('.re_c').children('div').children('.del_reply').show();
				}).mouseout(function(){
					$(this).children('.re_c').children('div').children('.del_reply').hide();
				});

				//删除评论，只有登陆后才有效果
				$('.del_reply').click(function(){
					var _this = $(this);
					$.ajax({
						url  : '<?php echo D::createUrl('user/DeleteReply'); ?>',
						type : 'GET',
						dataType : 'json',
						data : {id : _this.attr('rid')},
						success : function(data)
						{
							if (data == null) {
								alert('删除出现异常，请重试！');
								return false;
							}
							if (data.code == 0) {
								_this.parent().parent().parent().fadeOut(300);
							} else if(data.code == 1) {
								alert(data.msg);
								return false;
							}
						},
						error : function(msg)
						{
							if (typeof msg == 'object') {
								alert('你还没有登陆或者没有权限操作');
								return false;
							}
						}
					});
				});

				//增加评论
				$('#submit').click(function(){
					$(this).attr('disabled', true).val(' 请稍候... ');
					$.ajax({
						url  : '<?php echo D::createUrl('index/AddComment'); ?>',
						type : 'POST',
						dataType : 'json',
						data : {
							token : $('#token').val(),
							name  : $('#name').val(),
							email : $('#email').val(),
							content  : $('#content').val(),
							posts_id : $('#posts_id').val(),
							code  : $('#code').val()
						},
						success : function(data)
						{
							if (data.code == 1) {
								alert(data.msg);
								$('#submit').attr('disabled',false).val(' 发表评论 ');
								return false;
							} else if (data.code == 2) {
								$('#'+data.name).css({border:'1px solid red'}).focus();
								$('#submit').attr('disabled',false).val(' 发表评论 ');
								return false;
							} else if (data.code == 0) {
								$('#comment').append(data.html);
								$('.new_reply_element').fadeIn(300).removeClass('new_reply_element');
								$('#name').val('');
								$('#email').val('');
								$('#content').val('');
								$('#code').val('');
								$('#submit').attr('disabled',false).val(' 发表评论 ');
								return true;
							}
						}
					});
				});
			});
			</script>
		</div>
		<div id="sidebar" class="f_left">
			{include file=block/sidebar_index}
		</div>
	</div>